package com.jerry.huihome.module.find_near_mine.db;

/**
 * Created by axiang on 2016/5/18.
 */
public class HuihomeDB{
/*
* create table tb_huihome{
	_id integer primary key autoincrement,
	tvDesignersName text not null,
	ratingBar integer not null,
	successNum integer not null,
	designMaxFee integer not null,
	designMinFee integer not null,
	designAttest text not null,
	designVouch text not null,
	touxiangurl text,
	tupialist text,
}
* */
    public static final class HuihomeTable{
    //定义表名:
    public  static final String NAME = "tb_huihome";
    //列名:
    public static final String COLUMN_REGISTERNAME = "tvDesignersName";
    public static final String COLUMN_DESIGNERID = "designerid";
    public static final String COLUMN_RATINGBAR_COUNT = "ratingBar";
    public static final String COLUMN_SUCCESSNUM = "successNum";
    public static final String COLUMN_DESINMINFEE = "designMinFee";
    public static final String COLUMN_DESINMAXFEE = "designMaxFee";
    public static final String COLUMN_TOUXIANGURL = "touxiangurl";
    public static final String COLUMN_TYPE = "type";

    //脚本:
    public static final String SQL_CREATE_TABLE =
            "create table" + NAME +"(" +
            "_id integer primary key autoincrement," +
                    COLUMN_REGISTERNAME +"text not null,\n" +
                    COLUMN_RATINGBAR_COUNT +"integer not null," +
                    COLUMN_DESIGNERID +"integer not null," +
                    COLUMN_SUCCESSNUM +"integer not null," +
                    COLUMN_DESINMINFEE +"integer not null,\n" +
                    COLUMN_DESINMAXFEE +"integer not null" +
                    COLUMN_TOUXIANGURL +"text not null" +")";

    //修改表添加类型字段:
    public static final String SQL_ADD_TYPE_COLUMN = "alter table" +
            NAME + "add column" + COLUMN_TYPE +"integer not null default(0)";
}
}
